home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4614 < prev    next >
Encoding:
Text File  |  1996-08-05  |  1.3 KB  |  40 lines

  1. Path: uwm.edu!caen!jykim
  2. From: jykim@cobalt.engin.umich.edu (Joonyoung Kim)
  3. Newsgroups: comp.lang.c
  4. Subject: Q) include files...
  5. Date: 6 Feb 1996 04:30:05 GMT
  6. Organization: University of Michigan Engineering, Ann Arbor
  7. Distribution: world
  8. Message-ID: <4f6lgd$smq@srvr1.engin.umich.edu>
  9. NNTP-Posting-Host: jykim@cobalt.engin.umich.edu
  10. Originator: jykim@cobalt.engin.umich.edu
  11.  
  12.  
  13. Hi. I'm kind of a beginner in C programming.
  14. I'm trying to write a C program on SPARC under SunOS.
  15. My problem is, it doesn't seem that I can use math functions that deal with floating point variables. For example, if I try to run following code, I get a error message.
  16.  
  17. #include <stdio.h>
  18. #include <math.h>
  19. main()
  20. {
  21.     float a,b;
  22.     b = fabs(a);
  23.     printf("%f",b);
  24. }
  25.  
  26. Could you tell me why? Or solution?
  27. Thanks for reading this. Please e-mail me the solution.
  28.  
  29.  
  30.  
  31. -- 
  32. -----------------------               ------------------------------      
  33.                         Joonyoung Kim  
  34.                     University of Michigan                      
  35.   Dept. of Electrical Engineering and Computer Science, VLSI major 
  36.              http://www-personal.umich.edu/~jykim                             
  37.          jykim@engin.umich.edu       (313) 763-0722                        
  38. --------------------------------------------------------------------
  39.  
  40.